//举报反馈的请求封装
import request from "@/utils/http.ts"

//1.添加举报反馈
export const addReportAPI = (data: any) => {
    return request({
        url: 'report/addReport',
        method: 'post',
        data: {
            reportCheckStatus: data.reportCheckStatus,
            reportUserId: data.reportUserId, //举报人id
            reportUserRole: data.reportUserRole,//举报人角色
            reportUsername: data.reportUsername,//举报人姓名
            reportAccount: data.reportAccount, //举报人账号
            reportContact: data.reportContact,//举报人联系方式
            reportObjectId: data.reportObjectId, //被举报对象id
            reportObject: data.reportObject, //被举报对象
            reportDescribe: data.reportDescribe, //举报描述
            reportFileList: data.reportFileList, //举报文件
        }
    })
}

//2.修改举报
export const updateReportAPI = (data: any) => {
    return request({
        url: 'report/updateReport',
        method: 'post',
        data: {
            reportId: data.reportId,
            reportCheckStatus: data.reportCheckStatus,
            reportCheckRemark:data.reportCheckRemark,
            reportDescribe: data.reportDescribe, //举报描述
            reportFileList: data.reportFileList, //举报文件
        }
    })
}

//3.分页查询举报
export const pageQueryReportAPI = (data: any) => {
    return request({
        url: 'report/pageQueryReport',
        method: 'post',
        data: {
            reportCheckStatus: data.reportCheckStatus,
            reportObject: data.reportObject,
            reportUserId: data.reportUserId, //举报人id

            pageCurrent: data.pageCurrent,
            pageSize: data.pageSize,
        }
    })
}

//4.删除举报
export const deleteReportAPI = (data: any) => {
    return request({
        url: 'report/deleteReport',
        method: 'post',
        params: {
            reportId: data.reportId,
        }
    })
}

//5.查询举报详情
export const queryReportDetailAPI = (data: any) => {
    return request({
        url: 'report/queryReportDetail',
        method: 'post',
        params: {
            reportId: data.reportId,
        }
    })
}




























































